package com.eerl.pdev;

import lombok.ToString;

/**
 * 很单纯的二元tuple，很sb的一个类
 */
@ToString
public class Tuple <K, V>{
    public final K key;
    public final V val;

    public Tuple(K k, V v) {
        this.key = k;
        this.val = v;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Tuple<?, ?> obj1) {
            return obj1.key == this.key && obj1.val == this.val;
        }
        return false;
    }
}
